#ifndef MYWIDGET_H
#define MYWIDGET_H

#include <QWidget>
#include<QTimer>
#include<QThread>
#include"mythread.h"

namespace Ui {
class MyWidget;
}

class MyWidget : public QWidget
{
    Q_OBJECT

public:
    explicit MyWidget(QWidget *parent = nullptr);
    ~MyWidget();

    void dealTimeout();//定时器槽函数
    void dealDone();//线程结束
    void stopThread();//关闭线程槽函数

private slots:
    void on_pushButton_clicked();

private:
    Ui::MyWidget *ui;
    QTimer *myTimer;

    MyThread *myThread;//线程对象
};

#endif // MYWIDGET_H
